package com.stox.charting.ui.swing.event.listener;

import com.stox.charting.ui.swing.event.ChartModelChangedEvent;
import com.stox.charting.ui.swing.model.ChartModel;
import com.stox.charting.ui.swing.model.ChartModel.ChartModelListener;

public class ThemeChangedEventListener implements ChartModelListener {

	@Override
	public void chartModelChanged(ChartModelChangedEvent event) {
		if(event.getProperty().equalsIgnoreCase("theme")){
			ChartModel<?> chartModel = (ChartModel<?>)event.getSource();
			chartModel.getChart().repaint();
		}
	}

}
